from typing import TYPE_CHECKING

from sqlalchemy import Boolean, Column, Integer, String, text, TIMESTAMP, Text
from sqlalchemy.orm import relationship

from app.db.base_class import Base


class Block(Base):
    __tablename__ = 'tb_block'

    id = Column(Integer, primary_key=True)
    name = Column(String(32))
    code = Column(String(16))
    countryCode = Column('country_code',String(10))
    blockType = Column('block_type',String(10))
    createdDate = Column('created_date', TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'))
    updatedDate = Column('updated_date', TIMESTAMP, server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))

